package com.sxf.controller;

import java.util.UUID;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.sxf.domain.User;
import com.sxf.service.UserService;

@Controller
public class MainController extends SuperController {
	@Resource
	private UserService us;

	@RequestMapping("/main/test")
	public ModelAndView test() {
		ModelAndView mav = new ModelAndView();
		User u = new User();
		u.setLoginName(UUID.randomUUID().toString());
		us.insert(u);
		mav.setViewName("error/error");
		return mav;
	}
}
